#include "common.h"

int profitableSchemes(int n, int minProfit, int* group, int groupSize, int* profit, int profitSize);

int main()
{
	return 0;
}

int profitableSchemes(int n, int minProfit, int* group, int groupSize, int* profit, int profitSize)
{
	const int MOD = (int)1e9 + 7;

	int f[n + 1][minProfit + 1];
	memset(f, 0, sizeof(f));

	for (int i = 0; i <= n; i++) f[i][0] = 1;
	for (int i = 1; i <= groupSize; i++) {
		int requiredPeople = group[i - 1], curProfit = profit[i - 1];
		for (int j = n; j >= requiredPeople; j--)
			for (int k = minProfit; k >= 0; k--) {
				int gap = k - curProfit;
				if (gap < 0) gap = 0;
				f[j][k] += f[j - requiredPeople][gap];
				if (f[j][k] >= MOD) f[j][k] -= MOD;
			}
	}

	return f[n][minProfit];
}
